package com.bdth.mixapi.api.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bdth.mixapi.api.entity.Device;
import com.bdth.mixapi.api.mapper.DeviceMapper;
import com.bdth.mixapi.api.service.DeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author LGP
 * @since 2019-04-11
 */
@Service
public class DeviceServiceImpl extends ServiceImpl<DeviceMapper, Device> implements DeviceService {

    @Autowired
    DeviceMapper deviceMapper;

    @Override
    public List getChangeData(String srctime,String restime,String type) {
        Map<String, Object> query = new HashMap<>();
        query.put("srctime",srctime);
        query.put("chtime",restime);
        query.put("type",type);
        return deviceMapper.getChangeData(query);
    }
}
